/*
 * Powered By [fdlm]
 * Web Site: http://www.fdlm.cn
 * Since 2014 - 2015
 */

package com.sjyy.hospitaldepartmentrelation.model;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import cn.org.rapid_framework.util.DateConvertUtils;

import java.util.*;

import com.sjyy.hospitaldepartmentrelation.model.*;
import com.sjyy.hospitaldepartmentrelation.service.*;
import com.sjyy.hospitaldepartmentrelation.vo.query.*;

import javacommon.base.*;
import javacommon.util.*;
import javacommon.page.Page;

/**
 * @author cty email:caotianye@fdlm.cn
 * @version 1.0
 * @since 1.0
 */


public class HospitalDepartmentRelation extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "HospitalDepartmentRelation";
	public static final String ALIAS_RELATION_ID = "relationId";
	public static final String ALIAS_HOSPITAL_ID = "hospitalId";
	public static final String ALIAS_DEPARTMENT_ID = "departmentId";
	
	//date formats
	
	//columns START
    /** relationId       db_column: relation_id */	
	
	private java.lang.Integer relationId;
    /** hospitalId       db_column: hospital_id */	
	@NotNull 
	private java.lang.Integer hospitalId;
    /** departmentId       db_column: department_id */	
	@NotNull 
	private java.lang.Integer departmentId;
	//columns END

	public HospitalDepartmentRelation(){
	}

	public HospitalDepartmentRelation(
		java.lang.Integer relationId
	){
		this.relationId = relationId;
	}

	public void setRelationId(java.lang.Integer value) {
		this.relationId = value;
	}
	
	public java.lang.Integer getRelationId() {
		return this.relationId;
	}
	public void setHospitalId(java.lang.Integer value) {
		this.hospitalId = value;
	}
	
	public java.lang.Integer getHospitalId() {
		return this.hospitalId;
	}
	public void setDepartmentId(java.lang.Integer value) {
		this.departmentId = value;
	}
	
	public java.lang.Integer getDepartmentId() {
		return this.departmentId;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("RelationId",getRelationId())
			.append("HospitalId",getHospitalId())
			.append("DepartmentId",getDepartmentId())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getRelationId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof HospitalDepartmentRelation == false) return false;
		if(this == obj) return true;
		HospitalDepartmentRelation other = (HospitalDepartmentRelation)obj;
		return new EqualsBuilder()
			.append(getRelationId(),other.getRelationId())
			.isEquals();
	}
}

